import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/views/login.vue')
  },
  {
    path: '/register',
    name: 'Register',
    component: () => import('@/views/register.vue')
  },
  {
    path: '/user-list',
    name: 'UserList',
    component: () => import('@/views/user-list.vue')
  },
  {
    path: '/user-form',
    name: 'UserForm',
    component: () => import('@/views/user-form.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
